<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            margin: 0 auto;
           
        }
        #nav{
            width: 800px;
            height: 50px;
        background-color:dimgray;}
        .clearfix:after{
            display: block;
            content: "";
            clear: both;
            zoom: 1;
    
         
        }
        
         li{
             color: white;
             float: left;
              list-style: none;
             margin:0 20px;
             line-height: 50px;
             text-align: center;
             
             
         }
         li:hover{
             width: 80px;
             height: 50px;
             background-color: orange;
         }
    
    </style>
</head>
<body>
   <div id="nav" class="clearfix">
       <ul>
           <li>小米商城</li>
           <li>MIUI</li>
           <li>米聊</li>
           <li>游戏</li>
           <li>多看阅读</li>
           <li>云服务</li>
           <div></div>
       </ul>
       </div> 
</body>
</html>